package org.lex.dbq.model.jdbc.meta;

import org.lex.swt.table.AbstractRowData;

public class VersionVo extends AbstractRowData {
	public static final String[] COLUMN_NAMES = { "Object", "Name", "Major Version", "Minor Version", "Version" };

	public String object = "";
	public String name = "";
	public String version = "";
	public int majorVersion = 0;
	public int minorVersion = 0;

	@Override
	public String[] getColumns() {
		return COLUMN_NAMES;
	}

	@Override
	public String getText(int column) {
		String label = null;
		switch (column) {
		case 0:
			label = object;
			break;
		case 1:
			label = name;
			break;
		case 2:
			label = Integer.toString(majorVersion);
			break;
		case 3:
			label = Integer.toString(minorVersion);
			break;
		case 4:
			label = version;
			break;
		default:
			label = "(ERROR)";
		}
		return label;
	}
}